<?php
function setActive($controller, $myController) {
    $output = '';
    if($controller == $myController) {
        $output = 'active';
    }
    return $output;
}
?>
<!doctype html>
<html lang="fr">
    <head>
        <title><?php echo $title; ?></title>
        <meta charset="UTF-8" />
        <link href="asset/css/bootstrap.min.css" rel="stylesheet">        
        <link href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet">
        <link href="asset/css/style.css" rel="stylesheet">
        <script src="asset/js/jquery-1.10.2.min.js"></script>
        <script src="asset/js/bootstrap.min.js"></script>
        <script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
        <script src="asset/plugins/tinymce/tinymce.min.js"></script>
        <script src="asset/js/script.js"></script>
    </head>
    <body>
        <div class="navbar navbar-static-top navbar-inverse" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand"><?php echo $title; ?></a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav navbar-right">
                        <li class="<?php echo setActive($controller, 'annonce'); ?>"><a href="index.php?controller=annonce">Annonces</a></li>
                        <li class="<?php echo setActive($controller, 'attribut'); ?>"><a href="index.php?controller=attribut">Attributs</a></li>
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </div>
        <div class="container">
             <?php echo $content; ?>
        </div>   
        </div>
    </body>
</html>

